<?php echo $header; ?>
<div id="content">
  <div class="breadcrumb">
    <?php foreach ($breadcrumbs as $breadcrumb) { ?>
    <?php echo $breadcrumb['separator']; ?><a href="<?php echo $breadcrumb['href']; ?>"><?php echo $breadcrumb['text']; ?></a>
    <?php } ?>
  </div>
  <?php if ($error_warning) { ?>
  <div class="warning"><?php echo $error_warning; ?></div>
  <?php } ?>
  <?php if ($success) { ?>
  <div class="success"><?php echo $success; ?></div>
  <?php } ?>
  <div class="box">
    <div class="heading">
      <h1><img src="view/image/customer.png" alt="" /> <?php echo $heading_title; ?></h1>
      <div class="buttons"><a onclick="location = '<?php echo $insert; ?>'" class="button"><?php echo $button_insert; ?></a></div>
    </div>
    <div class="content">
      <form action="#" method="post" enctype="multipart/form-data" id="form">
        <table class="list">
          <thead>
            <tr>
              <td class="left"><?php echo $column_name; ?></td>
              <td class="left"><?php echo $column_display_name; ?></td>
              <td class="left"><?php echo $column_grade; ?></td>
              <td class="left"><?php echo $column_discount; ?></td>
              <td class="left"><?php echo $column_min_point; ?></td>
              <td class="left"><?php echo $column_max_point; ?></td>
              <td class="right"><?php echo $column_action; ?></td>
            </tr>
          </thead>
          <tbody>
            <?php if ($customer_grades) { ?>
            <?php foreach ($customer_grades as $customer_grade) { ?>
            <tr>
              <td class="left"><?php echo $customer_grade['name']; ?></td>
              <td class="left"><?php echo $customer_grade['display_name']; ?></td>
              <td class="left"><?php echo $customer_grade['grade']; ?></td>
              <td class="left"><?php echo $customer_grade['discount']; ?></td>
              <td class="left"><?php echo $customer_grade['min_point']; ?></td>
              <td class="left"><?php echo $customer_grade['max_point']; ?></td>
              <td class="right"><?php foreach ($customer_grade['action'] as $action) { ?>
                [ <a href="<?php echo $action['href']; ?>"><?php echo $action['text']; ?></a> ]
                <?php } ?></td>
            </tr>
            <?php } ?>
            <?php } else { ?>
            <tr>
              <td class="center" colspan="7"><?php echo $text_no_results; ?></td>
            </tr>
            <?php } ?>
          </tbody>
        </table>
      </form>
    </div>
  </div>
</div>
<?php echo $footer; ?> 